package com.auto.sns.honour.dao.impl;

import java.util.List;
import java.util.Map;

import com.system.common.Page;
import com.auto.sns.honour.domain.SnsHonourDefinition;
import com.auto.sns.honour.dao.ISnsHonourDefinitionDAO;
import com.system.util.PersistUtil;
import com.auto.sns.honour.sql.sqlid.SnsHonourDefinitionSqlID;
/**
 * : t_auto_sns_honour_definition
 * 
 * 
 * @author Gen
 */
public class SnsHonourDefinitionDAOImpl implements ISnsHonourDefinitionDAO{

	public SnsHonourDefinition insertSnsHonourDefinition(SnsHonourDefinition bean){
		return PersistUtil.insert(bean, SnsHonourDefinitionSqlID.INSERT);
	}

	public boolean deleteSnsHonourDefinition(String shdeGuid){
		PersistUtil.delete(shdeGuid, SnsHonourDefinitionSqlID.DELETE);
		return true;
	}	

	public SnsHonourDefinition updateSnsHonourDefinition(SnsHonourDefinition bean){
		return PersistUtil.update(bean, SnsHonourDefinitionSqlID.UPDATE);
	}	

	public SnsHonourDefinition loadSnsHonourDefinition(String shdeGuid){
		return PersistUtil.query(new SnsHonourDefinition().getClass(), shdeGuid);
	}

	public List<SnsHonourDefinition> queryList(Map<String,Object> param,Page page){
		page.setCount(PersistUtil.countSpecial(param, SnsHonourDefinitionSqlID.QUERY));
		return PersistUtil.querySpecial(param, SnsHonourDefinitionSqlID.QUERY, page.getFullOrderBy(), page.getOffset(), page.getLimit());
	}

}
